package com.guang.demo;

import com.guang.demo.config.AppConfig;
import com.guang.demo.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author liguang
 * @date 2022/8/24 9:35
 */
public class Test {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        UserService bean = annotationConfigApplicationContext.getBean(UserService.class);
        System.out.println(bean);
    }
}
